var e = require;
var t = module;
cc.Class({
    extends: cc.Component,
    properties: {
        speed: 1,
        progressBarView: {
            type: cc.ProgressBar,
            default: null
        }
    },
    onLoad: function() {
        this._ping = !0;
        this.progressBarView.progress = 0
    },
    update: function(e) {
        this._updateProgressBar(this.progressBarView, e)
    },
    _updateProgressBar: function(e, t) {
        var n = e.progress;
        if (n < 1 && this._ping) n += t * this.speed;
        else {
            n -= t * this.speed;
            this._ping = n <= 0
        }
        e.progress = n
    }
})